<%@page import="com.ddd.entity.News"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.ddd.service.NewsService"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
    // load data
    NewsService newsService = new NewsService(request);
    ArrayList list = newsService.loadAll();
%>
<html xmlns="http://www.w3.org/1999/xjsp">
    <head>
        <meta http-equiv="Content-Type" content="text/jsp; charset=utf-8" />
        <title>最新消息</title>
        <link href="../style.css" rel="stylesheet" type="text/css" />
        <script src="../Scripts/swfobject_modified.js" type="text/javascript"></script>
        <style type="text/css">
            <!--
            body {
                background-image: url(../images/back-200.gif);
            }
            -->
        </style>
    </head>
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
    <body>

        <div id="cell">
            <div id="cell2"></div>
            <div id="cell3">
                <div id="cell4"><div  align="center" id="long"  > </div></div>
                <div id="cell5">
                    <div  align="center"> 
                        <%@ include file="../menu.jsp" %>
                    </div>
                </div>
                <div id="cell11">
                    <div id="cell6">
                        <form action="" method="post"  id="froml">
                            <p>&nbsp;</p>
                            <div align="center"><img src="../images/related_partners.png" width="200" height="70" /></div>
                            <table width="210" border="0">
                                <tr>
                                    <td height="100"><a href="http://www.onlineplus.com.tw/" target="_self"><img src="../images/1.GIF" width="199" height="76" /></a></td>
                                </tr>
                                <tr>
                                    <td height="100"><a href="http://www.libraryandbook.net/about.asp" target="_self"><img src="../images/2.GIF" width="188" height="49" /></a></td>
                                </tr>
                                <tr>
                                    <td height="100"><a href="http://www.onlineplus.com.tw/" target="_self"><img src="../images/1.GIF" width="199" height="76" /></a></td>
                                </tr>
                            </table>

                        </form></div>
                    <div id="cell7">
                        <div id="cell8">

                        </div>
                        <div id="cell9">
                            <table width="758" border="1">
                                <tr>
                                    <th width="60" scope="col">編號</th>
                                    <th width="129" scope="col">發佈人</th>
                                    <th width="398" scope="col">內容</th>
                                    <th width="153" scope="col">發佈時間</th>
                                </tr>
                                <%for (int i=0;i<list.size();i++){
                                    News n = (News)list.get(i);
                                %>
                                <tr>
                                    <td align="center"><%=n.getId()%></td>
                                    <td align="center"><%=n.getCid()%></td>
                                    <td align="left"><%=n.getNews()%></td>
                                    <td align="center"><%=n.getCtime()%></td>
                                </tr>
                                <%}%>
                            </table>
                            <!--
                            <form action="" method="post"  id="fromr" >
                                <iframe src="news_main.jsp" name="content" width="785" marginwidth="0" height="694" marginheight="0" scrolling="No" frameborder="0"> </iframe>
                            </form>
                            -->
                        </div>

                    </div>
                    <div id="cell10">
                        <div align="center" >
                            <p>&nbsp;</p>
                            <p>YOUR JOURNAL資訊    版權所有 © 2011 YOURNAL! Taiwan All Rights Reserved </p>
                        </div></div>
                </div>
            </div>

            <div id="cell2"></div>

        </div>
    </body>
</html>
